{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                                           Unnamed: 0  page_rank\n",
      "4                           https://xs.nankai.edu.cn/   3.708256\n",
      "22                          http://www.nankai.edu.cn/   3.498478\n",
      "8            http://news.nankai.edu.cn/sp/index.shtml   3.462755\n",
      "3          http://news.nankai.edu.cn/mtnk/index.shtml   3.462755\n",
      "7         http://news.nankai.edu.cn/nkdxb/index.shtml   3.450922\n",
      "9            http://news.nankai.edu.cn/gb/index.shtml   3.450922\n",
      "5          http://news.nankai.edu.cn/gynk/index.shtml   3.450922\n",
      "1               http://news.nankai.edu.cn/index.shtml   3.450922\n",
      "6          http://news.nankai.edu.cn/nkrw/index.shtml   3.450922\n",
      "2          http://news.nankai.edu.cn/ywsd/index.shtml   3.450922\n",
      "10  http://news.nankai.edu.cn/wx/system/2019/06/03...   3.436983\n",
      "11           http://news.nankai.edu.cn/wx/index.shtml   3.436983\n",
      "14  http://news.nankai.edu.cn/ywsd/system/2024/12/...   3.436983\n",
      "20  http://news.nankai.edu.cn/ywsd/system/2024/12/...   3.436983\n",
      "15  http://news.nankai.edu.cn/ywsd/system/2024/12/...   3.436983\n",
      "13  http://news.nankai.edu.cn/ywsd/system/2024/12/...   3.436983\n",
      "16  http://news.nankai.edu.cn/ywsd/system/2024/12/...   3.421980\n",
      "19  http://news.nankai.edu.cn/ywsd/system/2024/12/...   3.421980\n",
      "18  http://news.nankai.edu.cn/ywsd/system/2024/12/...   3.421980\n",
      "12  http://news.nankai.edu.cn/ywsd/system/2024/12/...   3.413115\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "# 读取PageRank值并查看排名靠前的网页\n",
    "page_rankings = pd.read_csv(\"../data/page_rank.csv\", encoding='utf-8')\n",
    "top_ranked_pages = page_rankings.sort_values(by='page_rank', ascending=False).head(20)\n",
    "print(top_ranked_pages)  "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "ai_learn",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
